Go to Home Page
Questions?
Call 1-800-572-5517
 
  Go to Home Page  
  See all products
  See price schedules
  See manuals, tutorials, articles
  Download a free 30-day trial
  See user testimonials
  About Pacific Systems Group
 
 
SMF Tools
  See SMF Record Layouts
  See Sample SMF Reports
  Learn How to Export SMF Data
  Download Free SMF Reporting Software (30 days)
 
One of the greatest SMF record parsing programming languages I've ever seen. Chief, Large Systems Services Branch, NIH
  Choose Spectrum Writer to add 4GL to your product
  Report Writer Speedup Tips Article
Spectrum SMF Writer - the 4GL SMF Report Writer.

Add customized reports and PC export files to your product!

Table of Contents

NOTE: you can find this and other lessons in a
more complete and viewable format (including all Figures) in our Tutorial PDF.

Lesson 1. How to Make an SMF Report in 5 Minutes

  1. This lesson teaches you how to make a simple SMF report in just 5 minutes using only three control statements. These statements are:
  2. the INPUT statement
  3. the COLUMNS statement
  4. You can make a SMF report with just these statements:

INPUT: SMF14 /* COPY SMF 14 RECORD DEFINITIONS */
INCLUDEIF: SMF14RTY = 14 /* SELECT JUST TYPE 14 RECORDS */
COLUMNS: SMF14DTE SMF14TME SMF14JBN SMF14PGN SMF14TIOE5 SMF14_JFCBDSNM SMF14_JFCLRECL SMF14EXCP

  1. Figure 1 shows the report created from these statements.
  2. A report produced with just three control statements
    A report produced with just three control statements
How to Use the INPUT Statement
  1. The copy library PDS that you installed with Spectrum SMF Writer contains the SMF record layouts for dozens of SMF record types.
  2. The very first step in requesting an SMF report is to tell Spectrum SMF Writer which one of these SMF records has the data needed for your report. Use the INPUT statement to do this. For example:

INPUT: SMF14

  1. The above statement tells Spectrum SMF Writer that you want to produce a report using data from the type 14 SMF records. (Each SMF 14 record contains information about one input data set referenced during the execution of a job or task.)
  2. The INPUT statement above does these two things:

1) it copies the statements from member SMF14 in the copy library (which in turn copies another member named REC17 ). Those members define the SMF input file and describe all of the fields available in the SMF 14 record. That lets you refer to any of those fields in the control statements that follow.

2) it also sets this newly defined SMF14 file as the primary (and in this case only) input file for this report.

Basic Syntax
  1. All Spectrum SMF Writer control statements begin in column 1 with the name of the statement (for example, INPUT ), followed immediately by a colon. What follows next will depend on the particular control statement. For an INPUT statement, you simply put the name of the SMF file to use for the report.
The INCLUDEIF Statement
  1. We also used an INCLUDEIF statement. That tells Spectrum SMF Writer to "include" a record from the SMF file only "if" its record type equals 14. We will go into more detail about the INCLUDEIF statement in the next lesson.
How to Use the COLUMNS Statement
  1. After specifying the desired SMF record type in the INPUT and INCLUDEIF statements, the next step is to tell Spectrum SMF Writer which fields from that record you want to see in your report. Use the COLUMNS statement to do that. Each field named in this statement will appear as one column of data in the report. For example:

INPUT: SMF14 /* COPY SMF 14 RECORD DEFINITIONS */
INCLUDEIF: SMF14RTY = 14 /* SELECT JUST TYPE 14 RECORDS */
COLUMNS: SMF14DTE SMF14TME SMF14JBN SMF14PGN SMF14TIOE5 SMF14-JFCBDSNM SMF14-JFCLRECL SMF14EXCP

  1. The COLUMNS statement above tells Spectrum SMF Writer that we want columns in our report that show the date and time the SMF record was written, the job name, program name, DDNAME , DSNAME , LRECL and count of EXCP 's for that dataset.
  2. You may specify as many fields as there is room for in the report.
  3. With just the three statements shown above, we have given Spectrum SMF Writer everything it needs to produce the attractive report in Figure 1. This report has:
  4. a default title containing the name of the input file, as well as the date, time, day of the week, and page number
  5. the columns of data that we requested, appearing in the same order as we requested
  6. neat, underlined column headings identifying each column of data
  7. date, time and numeric fields that are properly formatted
  8. a Grand Totals line which shows totals for each of the numeric columns
  9. an item count, showing the number of records included in the report
What Files and Fields Are Available?
  1. You may be wondering what files can be named in the INPUT statement. And what fields are available for the COLUMNS statement. The answers can be found in the Spectrum SMF Writer "copy library." Each PDS member that begins with " SMF " is the file definition for a particular SMF record. (Or for a particular subtype of some of the complex SMF record types.) Choose from these names for your INPUT statement.
  2. The members beginning with " REC " contain the definitions for the individual fields for a given record. These are the fields you can choose from for your COLUMNS statement (and other statements that you will be learning about.)
  3. You can browse the copy library PDS to see what is available for you to report on. You can also get a list of all of the fields available for a file by just adding the SHOWFLDS(YES) parm to your INPUT statement, like this:

INPUT: SMF14 SHOWFLDS(YES)

  1. The above statement tells Spectrum SMF Writer to print (in the control statement listing) a list of all of the fields defined for SMF14 .
What about non-SMF Files?
  1. You may be thinking that this would be a very handy tool to use with other files that you are always making quick-and-dirty reports for. Or that have data you need to export into a PC spreadsheet. You are absolutely right! This is the perfect tool for all of those frequent ad-hoc requests that come up. And you won't even need to learn a new language.
  2. To address those needs, we offer a full-license version of this same program. It is called Spectrum Writer. Spectrum Writer can report on any file in your shop -- and even on DB2 tables. Call us to ask about upgrading your current license to a license for our full Spectrum Writer product. It does everything Spectrum SMF Writer does and more!
  3. We also permit you to use your current software to experiment (for non-productive purposes) with other files to actually see just how it works out for your shop. The software you now have allows you to report on a limited number of records from non-SMF files. See ... in the User's Guide to see how to easily set up a definition for any file you like. You can even use your existing COBOL or Assembler record layouts.
Summary
  1. Here is a summary of what we learned in this lesson:
  2. an INPUT statement is needed to tell Spectrum SMF Writer which SMF record to use for a particular report
  3. a COLUMNS statement is needed to tell Spectrum SMF Writer what columns of data to print in your report
  4. The next lesson will teach you how to make a report using only selected records from the SMF file.
To Learn More
  1. The page numbers below refer to pages in the User's Guide and Reference Manual.
  2. You can also learn:
  3. about writing control statements in general
  4. how to make a report column that contains a literal text
  5. how to print multiple report lines for each input record
  6. how to produce reports that are wider than 132 characters
  7. the complete syntax for the INPUT, INCLUDEIF and COLUMNS statements
NEXT LESSON: How to Export SMF Data to PC Programs

Spectrum SMF Writer - the 4GL SMF Report Writer.

Copyright 2024.
Pacific Systems Group.
All rights reserved.
Home | Products | Prices | Documentation | 30-Day Trials | Customer Reviews | Company | FAQ | Sample Reports | SMF Records
Send Your Comments or Questions